#include "acceptConn.h"

//引用
void acceptConn(int& fd, fd_set& readfds, int& maxfd)
{
    std::cout << "新线程-新客户端连接" << std::endl;
    int cfd = accept(fd, NULL, NULL);
    mtx.lock();
    FD_SET(cfd, &readfds);
    std::cout << "new cfd = " << cfd << std::endl;
    maxfd = maxfd > cfd ? maxfd : cfd;
    mtx.unlock();
}
